package com.lzw.mall.common.vo;

import com.lzw.mall.common.entity.Member;
import com.lzw.mall.common.util.RequestUtil;

//前台服务session服务类
public class OrderSessionUtil {

    private static final String CURRENT_KEY="CURRENT_MEMBER";
    //获取当前前台登录用户
    public static Member getCurrent(){
        Object object =RequestUtil.getSession().getAttribute(CURRENT_KEY);
        if(object == null){
            return null;
        }
        return (Member) object;
    }
    public static void setCurrent(Member member){
        RequestUtil.getSession().setAttribute(CURRENT_KEY, member);
    }
}
